fixed the error when property value is null.