Merge "Ensure the intent is non-null and throw NPE early" into main