Null-check request entity since it might not be present.

Closes #198.