Added check for urlSource function or string