Fix check for instanceof instance of class_implements