fix NPE when mPrimaryColor is null, fixes #5

I also compared to the iOS code where this error was not happening. Seems it snuck in while trying to optimize the if-statement.
Merge pull request #7 from rndstr/patch-1

fix NPE when mPrimaryColor is null, fixes #5