Check if debug function is_callable before execution.

Cases where configuration variables do not evaulate to true/false result in errors when Swift
attempts to call that value as a function.
Merge pull request #21 from UseAllFive/check-debug-function-is-callable

Check if debug function is_callable before execution.