Use empty() check instead of count()

Requested in https://github.com/wp-cli/wp-cli/pull/492#discussion_r4545088.