LPS-47157 SF: Check nullity instead of try catch