avoiding more null pointer exceptions defensely