Allow erlang functions to be passed as strings

- building on #173 
- added a test
- try to catch when allow_strfun is false and return an appropriate error