A better way to specify `@return` then is `@return {{layer: ?string, layerID: ?object}|undefined}`. `{?object}` means object or null.