An Agmon-Allegretto-Piepenbrink principle for Schroedinger operators