small fix for null handling