Fix spaces and check empty values on JS