If this:
tme.setValueAttribute(Time);
is throwing a null pointer, then this:
Time=TimeField.getText();
must be setting Time to null.
Clearly TimeField exists, otherwise you'd get an error thrown...