Made check for customcode option more robust

Prevents PHP notice when key is not set in array.
Merge pull request #17 from Rarst/customcode-check

Made check for customcode option more robust