Custom code / Format Data - split full name property

@ChrisoKlepke

when implementing the code and “first name” contains only one name, it duplicates the first name to the last name.

Is there a way to prevent the code from running if there is no space and last name?