when failure these functions should return undef

Change-Id: I92ca95457bb4471eefa692e61bd45ecc8ce08242