Check if ApplicationId is null in GetRegistrations
Fixes #346