null safe result check