null check in discovery