The UF cable must be marked as "UF-B cable."
THHN is not allowed in a wet location, and the comment made here indicating that PVC was used with THHN may be considered as a violation, especially when subject to flooding conditions.
If the location was considered as a damp location then, THHN may be OK, see Table 310.13.
Sometimes rodents like to chew on the insulation and that can lead to problems.
If I was doing this job, I would avoid stapleing the cable under the joists and would try to keep it concealed, if possible.
This, as always, is my personal opinion.