Fix findbugs null pointer issue