check for null device