Update the checkType Function