Check if first parameter is a javascript primitive