improve nil handling.