fix check to not raise E_NOTICEs
Merge pull request #61 from xabbuh/fix-handler-validation

fix check to not raise E_NOTICEs