Adding check to make sure rev isn't null

Change-Id: I4be3904ed413086d559c21f95fd35e9b1540ce7f