cater for null metadata