Try this
it should be
customerLoanOcr.Salary = customerLoanOcr.Salary != null ? customerLoanOcr.Salary : 0 ;
if that doesnt works try this..
if (customerLoanOcr.Salary == undefined || customerLoanOcr.Salary == '' || customerLoanOcr.Salary == null)
customerLoanOcr.Salary = 0;
$('#txtSalary').val(customerLoanOcr.Salary);