Update persianumber.js

Before calling replace method, we should be sure that type of str variable is string.