Fix use the fact that empty sequences are false.

For sequences(strings, lists, tuples), in order to consistent with
pep8 recommendations, 'if len(seq)' should be replaced with 'if seq',
and 'if not len(seq)' should be replaced with 'if not seq'.

Change-Id: Ieb2c90b7f87b54361a2c291a838550227fde9fbe
Closes-Bug: #1156472
Merge "Fix use the fact that empty sequences are false."