Ensure that custom escaping callables are actually callable

Plus adding phpdoc