split tooltip check into its own function