Minor checks to prevent NULL-pointer exceptions
(cherry picked from commit c295b834a2554b3f7eb792f1bc6d445e206fa55d)
1 file changed