type checking in parts of the file