I see. If this is a one shot only operation than your method is OK.
If this is something you are going to run every time, I'd suggest that you compute something like a boolean containsUpperCase
that you compute at index time and then just query it.