added extra null check for getExtension() result
Merge pull request #1 from rolandzwaga/develop

added extra null check for getExtension() result