probably is better to trim and to check for emptyness in the initial early return condition