On the validity of the Rapini-Papoular surface anchoring energy form in nematic liquid crystals