missing return caused the function to indicate a fail in the case of strings