null and type check what comes through postmessage