Use material instead of deprecated check