fixed the Msg error and added more Invalid subclasses to handle Is* functions