null and type checks