Check type of operator’s operands.