better code for checkingif a plugin is loaded