check to see if source is a function