import emoji  # type: ignore


def is_emoji(value) -> bool:
  if not isinstance(value, str):
    return False
  if emoji.emoji_count(value) > 0:
    return True
  shortcode = f":{value}:"
  emojized = emoji.emojize(shortcode)
  if emojized != shortcode and emoji.is_emoji(emojized):
    return True
  return False
