adding more better null handling