Member function without data access can be called on null object