check for plugin before using plugin function