Fix invalid projection crash

To reproduce:

    GET /endpoint?projection=test
    GET /endpoint?projection=["test"]