Improvements in type checks