Check the name is not null before trying spawn.