Fixed function getItemField() to handle when field is not a string.