Javascript Data Type Null Is Not A Subtype