Generate a proper error when trying to call a non-class method on non-instantiated class