Merge "Add null check before checking overlay" into pi-dev