Adds defined checks.
Merge pull request #1 from supersub0/master

Adds defined checks.