Also I wonder if it could be a one `if`, without duplicating stuff?