:snowflake: Improve isValidContainer() method