Fixed mg_parse_header to allow NULL strings