Make various checks optional based on environment vars

Change-Id: I3227957cf02e533fee04d8bd5d16374f78c5998a
Merge "Make various checks optional based on environment vars"