Fixing PETSc option check

closes #3169