[GRAILS-11161] Protect from exception in the case of an invalid ID passed in

This will treate a failed conversion the same as getting a null key.
Merge pull request #21 from beckje01/grails11161

[GRAILS-11161]