fix case where instance is None