Adding check for id
Merge pull request #554 from spekary/bugfix-IdChecks

Adding check for id