Check for emptiness instead size > 0

From cppcheck:

Checking for 'st' emptiness might be inefficient. Using st.empty() instead of st.size() can be faster. st.size() can take linear time but st.empty() is guaranteed to take constant time.
Merge pull request #20 from naoliv/patch-1

Check for emptiness instead size > 0