added chack for null revision