Sending HTTP 400 if type is empty/invalid