Add some checks on params