check js args to make sure they're not null