Added registerPlugin type checking.