Updated for null check
Fix for annon inner classes