Changes behavior on invalid content types

Sets observable to null instead of setting input value to empty.

Also provides a condition for averting a case where the file is
undefined. (Opening the file picker then hitting cancel will still
trigger a "change" event, without actually picking any file.)