Null issue fixed while value comparison