Check type of input