protect against potential npe
fix npe
does this help?