T-SQL to Check if Filestream feature is enabled at database level SQL Server 2012

Filetables the latest feature in SQL Server 2012 makes use of filestream feature at database level. Before creating filetables it is mandatory to know if the filestream is enabled at database level.
Here is the simple T-SQL that helps us determine the same

if exists(
select * from sys.database_files where type_desc=’FILESTREAM’)
PRINT ‘Filestream Configured For Datbase’
print ‘Filestream Not configured for database’

If it is not enabled, the t-SQL cna be run in SSMS new query window to enable filestream
execute sp_configure filestream_access_level,2