use stdlib functions is_string() and is_array() insted of reserved word type()

I ran this locally and didn't get an error but I am not really using the module to do much so I wouldn't call it well-tested. It's a fairly simple change though, assuming type($xyz) == 'string' is same as is_string($xyz).