Fix value check in getGetOrPost and getPostOrGet methods

In the getPostOrGet (and getGetOrPost) method, the $post value ($get) is checked as empty, and returned if it actually is empty, which is probably not what you want.
I have changed the if satements so that the value is returned if NOT empty, otherwise the $get value (or $post if using getGetOrPost) is returned.