Added -nan support as string in matrix loader