Throw exceptions instead of giving null data

Change-Id: Ie957991968aeb9200dc4c70644d8f309f8fd24fa
Merge "Throw exceptions instead of giving null data"