Refactor `findTooltipPosition` by removing size calculation from this function and adding new TOP and BOTTOM positions. Also made the return value optional, as we want to nahandle the case when therere it is impossible to display the tooltip anytanywhere.