Use typeof instead of Object...toString() to check for Function