removes a unneccasary null check