Added regexp. Better check of what a function is.