fix(python_django_s3): Call is_valid_policy where appropriate

Note: This code returns a 400 error in case of failure, which is more appropriate than 500 to indicate that something is wrong with the request.