Explicit null check to avoid bool conversion with 0