Merge "add additional null check to prevent exceptions"