Default value middleware