Add payload length checking methods.