Check leading and trailing whitespace

Change-Id: I16f9fbc7214cc4079d5bbabb1e937ba8e71defdd