Summarized two lines of code into one

Since split() returns an array (if the string is not empty), then we might chain with the length property.