Update deprecated method, null handling