type and value comparison