Better null handling