Better null checks, and allow selecting root with $()