A best approximation theorem in hyperconvex metric spaces