public PsiReference[] getReferencesFromKey(@NotNull YAMLKeyValue keyValue) {
    return Optional.ofNullable(getReferenceFromKey(keyValue))
      .map(ref -> new PsiReference[]{ref})
      .orElse(PsiReference.EMPTY_ARRAY);
  }
public PsiReference[] getReferencesFromKey(@NotNull YAMLKeyValue keyValue)