Fix NPE when registrations is null
Merge pull request #3109 from juggernaut/fix-npe-registrations

Fix NPE when registrations is null