deal with null here - happens e.g. when platform is android

there was a workaround described by @romanman for #43 and the issue was closed. But we can avoid the crash in the first place by dealing with the null-value that is possible here