BUG: convert nan to None before insert data into mysql

For issue #4199