Improve value checking with type and value comparison operators