Null match result checking added