Make check more pythonic

Use 'if key in ('metadata', 'system_metadata'):'
instead of 'if key == 'metadata' or key == 'system_metadata''

The reason for the change is:
1. The issue has come up more than once in review cycles
2. It is easier to read

Moving forwards it may be useful if there are extra use cases.

Change-Id: Icd4ab4ebd021720b140f9fdb89d201781388c8ff
Merge "Make check more pythonic"