typeof > isFunction
adding an optional target for sugarRestore