check for null in models