Faster method to determine type of the received data