checking for type of input