Prevent error when calling getMetadata when no metadata exists