check for null and undefined