Add check for existence of function, before trying to call it.
Merge pull request #5 from adam-vessey/7.x

Add check for existence of function, before trying to call it.