Fix value check in getGetOrPost and getPostOrGet methods