use prop type check for null