Added null check to prevent splash screen crash