fix the #get for typo and check on undefined instead of null