Check for null before passing primitive values to MetadataStore