Pull the string optional checking out into func